import request from '@/utils/request'

// 查询列表
export function listTextbook(query) {
  return request({
    url: '/textbook/list',
    method: 'get',
    params: query
  })
}

export function addTextBook(data){
  return request({
    url: '/textbook/add',
    method: 'post',
    data: data
  })
}

/**
 *
 * @param query
 * @returns {*}
 */
export function updateTextBook(data){
  return request({
    url: '/textbook/update',
    method: 'post',
    data: data
  })
}

export function delTextBook(id){
  return request({
    url: '/textbook/del',
    method: 'post',
    params: { id: id }
  })
}

export function info(id){
  return request({
    url: '/textbook/info',
    method: 'get',
    params: { id: id },
  })
}


export function read(id){
  return request({
    url: '/textbook/read',
    method: 'get',
    params: { id: id },
    timeout: 3 * 60 * 1000,
  })
}

